Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build without debugger symbols #592

Merged
merged 4 commits into from
Jun 20, 2019
Merged

build without debugger symbols #592

merged 4 commits into from
Jun 20, 2019

Conversation

gregwebs
Copy link
Contributor

This makes the binaries significantly smaller

before:
30M images/tidb-operator/bin/tidb-admission-controller
47M images/tidb-operator/bin/tidb-controller-manager
42M images/tidb-operator/bin/tidb-discovery
32M images/tidb-operator/bin/tidb-scheduler

after:
30M images/tidb-operator/bin/tidb-admission-controller
36M images/tidb-operator/bin/tidb-controller-manager
32M images/tidb-operator/bin/tidb-discovery
24M images/tidb-operator/bin/tidb-scheduler

Note that stack traces still work, this information is just for the debugger. Set DEBUGGER=1 to build for debuggers. Eventually we may need to distribute both of these.

This issue came up when I was adding a new binary and it was initially 40M in size! After some changes I made, even after adding that binary the total binary size of all binaries will be smaller

Testing

I ran these binaries on GKE. I did see proper stack information from a panic.

This makes the binaries significantly smaller

before:
30M     images/tidb-operator/bin/tidb-admission-controller
47M     images/tidb-operator/bin/tidb-controller-manager
42M     images/tidb-operator/bin/tidb-discovery
32M     images/tidb-operator/bin/tidb-scheduler

after:
30M     images/tidb-operator/bin/tidb-admission-controller
36M     images/tidb-operator/bin/tidb-controller-manager
32M     images/tidb-operator/bin/tidb-discovery
24M     images/tidb-operator/bin/tidb-scheduler
@weekface
Copy link
Contributor

/run-e2e-tests

1 similar comment
@gregwebs
Copy link
Contributor Author

/run-e2e-tests

Copy link
Contributor

@jlerche jlerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gregwebs gregwebs merged commit b95df21 into master Jun 20, 2019
@gregwebs gregwebs deleted the smaller-binary branch June 20, 2019 16:23
@gregwebs gregwebs mentioned this pull request Jul 5, 2019
2 tasks
@csuzhangxc csuzhangxc mentioned this pull request Dec 22, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants